package com.example.studentcompetitionplatform.mapper;

import com.example.studentcompetitionplatform.entity.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface UserMapper {
//登录
    //判断账号密码是否正确
    Boolean selectUP(Users users);
    //获取user_id
    Users selectUI(Users users);
    //获取role_name
    Users selectR(Users users);
//注册
    //检查username是否已经存在
    Users selectU(Users users);
    //插入数据
    void insertUser(Users users);
//删除
    Integer deleteById(Users users);
//修改
    void update(Users users);
//分页数据
    //查询username的数据的总条数
    Integer findUserTotal(String username);
    //
    List<Users> selectPage(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("username") String username, @Param("email") String email, @Param("phone") String phone);
}
